package com.mall.dao;

import com.mall.domain.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * 用户的持久层接口
 *
 * @author : Bei-Zhen
 * @date : 2020-12-25 19:35
 */
@Repository
public interface IUserDao {

    /**
     * 验证登录
     * @param loginUser
     * @return
     */
    @Select("select * from tb_user where username=#{loginUser.username} and password=#{loginUser.password} and status=1")
    User login(@Param("loginUser") User loginUser);
}
